Skip to content

Conversation

@iamgabrielma
Copy link
Contributor

@iamgabrielma iamgabrielma commented Oct 22, 2025

Closes WOOMOB-1294

Description

This PR takes care of 4 warnings regarding the app scanner:

  • 'isVideoOrientationSupported' was deprecated in iOS 17.0: Use -isVideoRotationAngleSupported: instead
  • 'AVCaptureVideoOrientation' was deprecated in iOS 17.0: Use AVCaptureDeviceRotationCoordinator instead
  • 'videoOrientation' was deprecated in iOS 17.0: Use -videoRotationAngle instead
  • SF Symbol 'arrow.triangle.2.circlepath.camera' is deprecated, use 'arrow.trianglehead.2.clockwise.rotate.90.camera' instead.

Testing information

The changes only affect the camera orientation logic, feel free to test the scanner functionality as well, but is not needed.

  • Run the app on a phone, navigate to Orders > tap on the scanner icon > Observe that changing the device orientation changes the scanner adequately (except for upside-down if the scanner is open on a sheet)
  • Perform the same test on an iPad, the scanner shows modally so device orientation will work for 4 orientations.

Screenshots

20251022.-.scanner.orientation.phone.480p.mov
20251022.-.scanner.orientation.ipad.480p.mov

Comment on lines +302 to +307
enum VideoRotationAngle {
static let portrait: CGFloat = 90
static let landscapeRight: CGFloat = 0
static let landscapeLeft: CGFloat = 180
static let portraitUpsideDown: CGFloat = 270
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there is no enum replacement to what we had before iOS17, or I couldn't find it 🤔 I made a new one here

@iamgabrielma iamgabrielma added type: task An internally driven task. type: technical debt Represents or solves tech debt of the project. labels Oct 22, 2025
@iamgabrielma iamgabrielma marked this pull request as ready for review October 22, 2025 05:04
@iamgabrielma iamgabrielma added this to the 23.6 milestone Oct 22, 2025
@iamgabrielma iamgabrielma requested a review from jaclync October 22, 2025 05:05
@wpmobilebot
Copy link
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16268-a2de9a0
Version23.5
Bundle IDcom.automattic.alpha.woocommerce
Commita2de9a0
Installation URL404bgvtd1u428
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Copy link
Contributor

@jaclync jaclync left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing these warnings, scanning still works well on iPhone and iPad :shipit:

@iamgabrielma iamgabrielma merged commit 06e16dd into trunk Oct 24, 2025
24 checks passed
@iamgabrielma iamgabrielma deleted the task/WOOMOB-1294-wcios17-scanner-deprecations branch October 24, 2025 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task An internally driven task. type: technical debt Represents or solves tech debt of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants